#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include <math.h>
using namespace std;

class vehicle
{
protected:
	int wheels;
	double weight;
public:
	vehicle(int a, double b)
	{
		wheels = a;
		weight = b;
	}
	void disp()
	{
		cout << "wheels=" << wheels << ",weight=" << weight << endl;
	}
};
class car:private vehicle
{
	int passenger_load;
public:
	car(int a, int b, int c) :vehicle(a,b)
	{
		passenger_load = c;
	}
	void disp()
	{
		vehicle::disp();
		cout << "passenger_load=" << passenger_load << endl;
	}
};
class truck :private vehicle
{
	int passenger_load;
	int payload;
public:
	truck(int a, int b, int c,int d) :vehicle(a, b)
	{
		passenger_load = c;
		payload = d;
	}
	void disp()
	{
		vehicle::disp();
		cout << "passenger_load=" << passenger_load << "payload=" << payload << endl;
	}
};


int main()
{
	vehicle v(100, 99);
	v.disp();
	
	car c(50, 40, 30);
	c.disp();
	
	truck t(20, 15, 10, 5);
	t.disp();
	return 0;
}

